<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例6</title>
</head>
<body>
    <h1>原型对象</h1>
    <script>
        function Student(name,age){
            this.name = name;
            this.age = age;
        }

        Student.prototype.gender = '男';

        const stu1 = new Student('张三',18);
        stu1.gender = "accp"
        console.log(stu1,stu1.gender)

        const stu2 = new Student('里斯',19);
        console.log(stu2,stu2.xxx)
    </script>
</body>
</html>